package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.QualityMapper;
import com.ruoyi.system.domain.Quality;
import com.ruoyi.system.service.IQualityService;
import com.ruoyi.common.support.Convert;

/**
 * 质检单 服务层实现
 * 
 * @author ruoyi
 * @date 2018-12-24
 */
@Service
public class QualityServiceImpl implements IQualityService 
{
	@Autowired
	private QualityMapper qualityMapper;

	/**
     * 查询质检单信息
     * 
     * @param qualityId 质检单ID
     * @return 质检单信息
     */
    @Override
	public Quality selectQualityById(Integer qualityId)
	{
	    return qualityMapper.selectQualityById(qualityId);
	}
	
	/**
     * 查询质检单列表
     * 
     * @param quality 质检单信息
     * @return 质检单集合
     */
	@Override
	public List<Quality> selectQualityList(Quality quality)
	{
	    return qualityMapper.selectQualityList(quality);
	}
	
    /**
     * 新增质检单
     * 
     * @param quality 质检单信息
     * @return 结果
     */
	@Override
	public int insertQuality(Quality quality)
	{
	    return qualityMapper.insertQuality(quality);
	}
	
	/**
     * 修改质检单
     * 
     * @param quality 质检单信息
     * @return 结果
     */
	@Override
	public int updateQuality(Quality quality)
	{
	    return qualityMapper.updateQuality(quality);
	}

	/**
     * 删除质检单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteQualityByIds(String ids)
	{
		return qualityMapper.deleteQualityByIds(Convert.toStrArray(ids));
	}
	
}
